package com.lovi.io_;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 读一下非utf-8编码文本
 */
public class InputStreamReader01 {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("D:\\桌面\\test-coding.txt"),"gbk");
        int readLen = 0;
        while((readLen =isr.read())!=-1){
            System.out.print((char)readLen);
        }
        isr.close();
    }
}
